Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 13 - View Objects / View Objects Reference
Application-Defined Routines /


TQ3ViewIdleMethod

You can define an idle method to receive occasional callbacks to your application during lengthy operations.

typedef TQ3Status (*TQ3ViewIdleMethod) (
TQ3ViewObject view, 
const void *idleData);
view
A view.
idleData
A pointer to an application-defined block of data.
DESCRIPTION
Your TQ3ViewIdleMethod function is called occasionally during lengthy operations, such as rendering a complex model. You can use an idle method to provide a means for the user to cancel the lengthy operation (for example, by clicking a button or pressing a key sequence such as Command-period).

If your idle method returns kQ3Success, QuickDraw 3D continues its current operation. If your idle method returns kQ3Failure, QuickDraw 3D cancels its current operation and returns kQ3ViewStatusCancelled the next time you call Q3View_EndRendering or a similar function. You should not call Q3View_Cancel (or any other QuickDraw 3D routine) inside your idle method.

There is currently no way to indicate how often you want your idle method to be called. You can read the time maintained by the Operating System if you need to determine the amount of time that has elapsed since your idle method was last called.

SPECIAL CONSIDERATIONS
You must not call any QuickDraw 3D routines inside your idle method. In particular, you must not change any of the settings of the view being rendered or call Q3View_StartRendering on that same view.

Some renderers (particularly those that use hardware accelerators) might not support idle methods.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996